package net.aiion.weave.impl.bytecode.events;

import net.aiion.weave.spi.bytecode.BytecodeVisitor;
import net.aiion.weave.spi.bytecode.events.CodeStartBytecodeEvent;

public class CodeStartBytecodeEventImpl extends BytecodeEventImpl implements CodeStartBytecodeEvent
{
    private static final CodeStartBytecodeEvent INSTANCE = new CodeStartBytecodeEventImpl();

    public CodeStartBytecodeEventImpl() {
    }

    @Override
    public int getType() {
        return CODE_START;
    }

    public static CodeStartBytecodeEvent getInstance() {
        return INSTANCE;
    }

    @Override
    public BytecodeVisitor acceptBytecodeVisitor(final BytecodeVisitor aBytecodeVisitor) {
        aBytecodeVisitor.asBytecodeMethodVisitor().visitCodeStart(this);
        return aBytecodeVisitor;
    }
}
